package com.msmall.community.common.dao.hibernate;

import java.util.List;

import com.msmall.base.dao.hibernate.BaseDaoHibernate;
import com.msmall.base.util.ConstantDB;
import com.msmall.community.common.dao.LinkDao;
import com.msmall.community.common.model.Link;

public class LinkDaoHibernate extends BaseDaoHibernate<Link, Long> implements LinkDao{
	public LinkDaoHibernate(){
		super(Link.class);
	}

	public List<Link> loadAllEnabled() throws Exception {
		String queryString = "from Link where enabled="+ConstantDB.AVALIABLE+ " order by orders asc"; 
		return getHibernateTemplate().find(queryString);
	}
}
